package com.lytoyo.neihanduanzi.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lytoyo.neihanduanzi.model.Result;
import com.lytoyo.neihanduanzi.model.blog.BlogComment;
import com.lytoyo.neihanduanzi.model.dto.BlogCommentDto;

import java.util.List;
import java.util.Map;

/**
 * Package:com.lytoyo.neihanduanzi.service
 *
 * @ClassName:BlogCommentService
 * @Create:2025/3/16 10:47
 **/
public interface BlogCommentService extends IService<BlogComment> {
    /**
     * 分页查询博客评论
     * @param page
     * @param blogId
     * @return
     */
    Map gainComment(Page<BlogComment> page, Long blogId);

    /**
     * 添加评论
     * @param blogCommentDto
     * @return
     */
    Result addComment(BlogCommentDto blogCommentDto);

    /**
     * 获取子评论
     * @param page
     * @param rootCommentId
     * @return
     */
    Map gainChildComment(Page<BlogComment> page,Long rootCommentId);

    /**
     * 评论
     * @param blogCommentDto
     * @return
     */
    Result comment(BlogCommentDto blogCommentDto);
}
